﻿using System.Runtime.Serialization;

namespace FuiouPay.Models.Request {
    public class PayRequestInfo : FuiouRequestInfo {
        /// <summary>
        /// 必填，商品描述, 商品或支付单简要描述
        /// </summary>
        [DataMember(Name = "goods_des")]
        public string GoodsDes { get; set; }

        /// <summary>
        /// 单品优惠功能字段，数组:[{}]
        /// </summary>
        [DataMember(Name = "goods_detail")]
        public string GoodsDetail { get; set; }

        /// <summary>
        /// 附加数据
        /// </summary>
        [DataMember(Name = "addn_inf")]
        public string AddnInf { get; set; }

        /// <summary>
        /// 必填，商户订单号, 商户系统内部的订单号（5到30个字符、 只能包含字母数字,区分大小写)
        /// </summary>
        [DataMember(Name = "mchnt_order_no")]
        public string MchntOrderNo { get; set; }

        /// <summary>
        /// 货币类型,默认人民币：CNY
        /// </summary>
        [DataMember(Name = "curr_type")]
        public string CurrType { get; set; }

        /// <summary>
        /// 必填，总金额, 订单总金额，单位为分
        /// </summary>
        [DataMember(Name = "order_amt")]
        public int OrderAmt { get; set; }

        /// <summary>
        /// 必填，终端IP，默认为：127.0.0.1
        /// </summary>
        [DataMember(Name = "term_ip")]
        public string TermIp { get; set; } = "127.0.0.1";

        /// <summary>
        /// 必填，交易起始时间, 订单生成时间，格式为yyyyMMddHHmmss
        /// </summary>
        [DataMember(Name = "txn_begin_ts")]
        public string TxnBeginTs { get; set; }

        /// <summary>
        /// 商品标记
        /// </summary>
        [DataMember(Name = "goods_tag")]
        public string GoodsTag { get; set; }

        /// <summary>
        /// 交易关闭时间,如不设置，默认填0
        /// 单位:分钟， 最大值为1440 例如：1天=1440
        /// </summary>
        [DataMember(Name = "reserved_expire_minute")]
        public int ReservedExpireMinute { get; set; } = 0;

        /// <summary>
        /// 富友终端号
        /// </summary>
        [DataMember(Name = "reserved_fy_term_id")]
        public string ReservedFyTermId { get; set; }

        /// <summary>
        /// 富友终端类型
        /// 0:其他
        /// 1:富友终端
        /// 2:POS机
        /// 3:台卡
        /// 4:PC软件
        /// </summary>
        [DataMember(Name = "reserved_fy_term_type")]
        public string ReservedFyTermType { get; set; }

        /// <summary>
        /// 终端序列号
        /// </summary>
        [DataMember(Name = "reserved_fy_term_sn")]
        public string ReservedFyTermSn { get; set; }

        /// <summary>
        /// 设备信息，托传给微信。用于单品券核销
        /// </summary>
        [DataMember(Name = "reserved_device_info")]
        public string ReservedDevicInfo { get; set; }

        /// <summary>
        /// 支付宝扩展参数，花呗使用
        /// JSON串，示例值：
        /// {"dynamic_token_out_biz_no":"66666", --条码支付中，目前支持的用法为：sence_no
        /// "hb_fq_num":"3", --花呗分期期数：仅支持3、6、12
        /// "hb_fq_seller_percent": "123"  --花呗分期商家手续费比例，目前仅支持用户出资，如需使用，请填写0！ 目前该字段未生效，我司会默认当0处理。
        /// "industry_reflux_info": "{\"scene_code\":\"metro_tradeorder\", \"channel\":\"xxxx\", \"scene_data\":{\"asset_name\":\"ALIPAY\"}}"} --行业数据回流信息。
        /// </summary>
        [DataMember(Name = "reserved_ali_extend_params")]
        public string ReservedAliExtendParams { get; set; }
    }
}
